<%@page import="com.sun.mail.handlers.image_gif"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" import="java.util.*"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
  <style type="text/css">
    .label
    {
      color:blue;
    } 
    table tr td a:link
    {
       text-decoration: none;
      color: #6A71BA;
      font-weight: bold;
    }
     table tr td a:hover
    {
       text-decoration: underline;
      color: #2D38B3;
    }    
  </style>
</head>

<%
if(session.getAttribute("emailId")==null)
{
	response.sendRedirect("index.jsp");
}
else
{
@SuppressWarnings("unchecked")
ArrayList<String> users = (ArrayList<String>)request.getAttribute("users");
if(users.size()==0)
{
%>
No Result Found!!!!
<%
}
else
{
%>
<%=users.size()/6 %> Result Found 
<%}
Iterator<String> it = users.iterator();
while(it.hasNext())
{
	String profile_picture_url = it.next();
	String name = it.next();
	String email_id = it.next();
	String date_of_birth = it.next();
	String project_name = it.next();
	String gender = it.next();
%>
<table cellpadding="5" cellspacing="5">
	<tr>
		<td rowspan="3">
			<%
				String imgUrl="";
				if(profile_picture_url != null){
						imgUrl = "Upload/"+ profile_picture_url;
				}
				 else if(gender.equals("Male")){
					 imgUrl="Upload/male.jpg";
				 }
				 else
					 imgUrl="Upload/female.jpg";
			%>
			<img alt="" src="<%=imgUrl%>" width="100" height="100">
		</td>
		<td><a href="OtherUserHome.jsp?userEmail=<%=email_id %>"><%=name %></a></td>
	</tr>
	<tr>
		<td>
			<span class=label >Contact:</span>&nbsp;<%=email_id %>
		</td>
	</tr>
	<tr>
		<td>
			<span class=label >Project: </span>&nbsp;<%=project_name %>
		</td>
	</tr>
</table>
<%
}}
%>
<table>
</table>